package com.sny.upgrade.firebase;

import android.content.Intent;
import android.util.Log;

import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;

/**
 * Created by tyler.tang on 2017/5/23.
 */

public class LabFireBaseIDService extends FirebaseInstanceIdService {

    @Override
    public void onTaskRemoved(Intent rootIntent) {
        super.onTaskRemoved(rootIntent);
    }


    @Override
    public void onTokenRefresh() {
        super.onTokenRefresh();

        /*
        The registration token may change when:

        The app deletes Instance ID
        The app is restored on a new device
        The user uninstalls/reinstall the app
        The user clears app data.
        */

        Log.i("FCM", "ID" + FirebaseInstanceId.getInstance().getId());

    }

}
